<template>
	<div>
		<u-table ref="table" v-loading="$parent.loading" :data="value" row-key="SysStoreID" :use-virtual="useVirtual"
			v-bind="$props" v-on="$listeners">
			<slot name="ParentIDBefore"></slot>
			<slot name="ParentID">
				<!-- <u-table-column prop="ParentID" :label="keyLan['ParentID']" width="110" align="right"></u-table-column> -->
				<u-table-column prop="Parent.SysStoreName" :label="replaceID(keyLan['ParentID'])" width="110"
					align="right" v-if="user.isAdminStore||user.isMainStore"></u-table-column>
			</slot>
			<slot name="ParentIDAfter"></slot>
			<slot name="EnumSysStoreTypeBefore"></slot>
			<slot name="EnumSysStoreType">
				<u-table-column prop="EnumSysStoreType" :label="keyLan['EnumSysStoreType']" width="120" align="center"
					v-if="user.isAdminStore||user.isMainStore">
					<template v-slot="scope">
						<span v-html="getLabel(scope.row.EnumSysStoreType,EnumSysStoreType)"></span>
					</template>
				</u-table-column>
			</slot>
			<slot name="EnumSysStoreTypeAfter"></slot>
			<slot name="SysStoreNameBefore"></slot>
			<slot name="SysStoreName">
				<u-table-column prop="SysStoreName" :label="keyLan['SysStoreName']" width="130" align="left">
				</u-table-column>
			</slot>
			<slot name="SysStoreNameAfter"></slot>
			<slot name="DirectorBefore"></slot>
			<slot name="Director">
				<u-table-column prop="Director" :label="keyLan['Director']" width="65" align="left"></u-table-column>
			</slot>
			<slot name="DirectorAfter"></slot>
			<slot name="PhoneNumberBefore"></slot>
			<slot name="PhoneNumber">
				<u-table-column prop="PhoneNumber" :label="keyLan['PhoneNumber']" width="130" align="left">
				</u-table-column>
			</slot>
			<slot name="PhoneNumberAfter"></slot>
			<slot name="ProvinceBefore"></slot>
			<slot name="Province">
				<u-table-column prop="Province" :label="keyLan['Province']" width="100" align="left"></u-table-column>
			</slot>
			<slot name="ProvinceAfter"></slot>
			<slot name="CityBefore"></slot>
			<slot name="City">
				<u-table-column prop="City" :label="keyLan['City']" width="100" align="left"></u-table-column>
			</slot>
			<slot name="CityAfter"></slot>
			<slot name="DistrictBefore"></slot>
			<slot name="District">
				<u-table-column prop="District" :label="keyLan['District']" width="100" align="left"></u-table-column>
			</slot>
			<slot name="DistrictAfter"></slot>
			<slot name="AddressBefore"></slot>
			<slot name="Address">
				<u-table-column prop="Address" :label="keyLan['Address']" width="150" align="left"></u-table-column>
			</slot>
			<slot name="AddressAfter"></slot>
			<!-- <slot name="LongitudeBefore"></slot>
            <slot name="Longitude">
                <u-table-column prop="Longitude" :label="keyLan['Longitude']" width="50"></u-table-column>
            </slot>
            <slot name="LongitudeAfter"></slot>
            <slot name="LatitudeBefore"></slot>
            <slot name="Latitude">
                <u-table-column prop="Latitude" :label="keyLan['Latitude']" width="50"></u-table-column>
            </slot>
            <slot name="LatitudeAfter"></slot> -->

			<slot name="MaxStoreCountBefore"></slot>
			<slot name="MaxStoreCount">
				<u-table-column v-if="user.isAdminStore" prop="MaxStoreCount" :label="keyLan['MaxStoreCount']"
					width="120"></u-table-column>
			</slot>
			<slot name="MaxStoreCountAfter"></slot>

			<slot name="EnumStatusBefore"></slot>
			<slot name="EnumStatus">
				<u-table-column prop="EnumStatus" :label="keyLan['EnumStatus']" width="50" align="center">
					<template v-slot="scope">
						<span v-html="getLabel(scope.row.EnumStatus,EnumStatus)"></span>
					</template>
				</u-table-column>
			</slot>
			<slot name="EnumStatusAfter"></slot>
			<slot name="CreateDateBefore"></slot>
			<slot name="CreateDate">
				<u-table-column prop="CreateDate" :label="keyLan['CreateDate']" width="160" align="center">
					<template v-slot="scope">
						<span v-if="!!scope.row.CreateDate">{{scope.row.CreateDate | datetime}}</span>
					</template>
				</u-table-column>
			</slot>
			<slot name="CreateDateAfter"></slot>
			<slot name="RemarkBefore"></slot>
			<slot name="Remark">
				<u-table-column prop="Remark" :label="keyLan['Remark']" width="250" align="left"></u-table-column>
			</slot>
			<slot name="RemarkAfter"></slot>

			<u-table-column2 v-if="showOp">
				<template v-slot="scope">
					<slot name="replace" :row='scope.row' :$index='scope.$index' :column="scope.column"
						:store="scope.store" :_self="scope._self">
						<slot name="btnEdit" :row='scope.row' :$index='scope.$index' :column="scope.column"
							:store="scope.store" :_self="scope._self">
							<el-button type="text" @click="btnEditParent(scope)" v-if="buttonParent.编辑">
								{{comLan["btnEdit"]}}
							</el-button>
						</slot>
						<slot name="btnEnumStatus" :row='scope.row' :$index='scope.$index' :column="scope.column"
							:store="scope.store" :_self="scope._self">
							<el-button type="text" @click="btnEnumStatusParent(scope,scope.row.EnumStatus==0?1:0)"
								v-if="buttonParent.启用禁用">
								{{scope.row.EnumStatus==0 ? comLan["btnEnable"] : comLan["btnDisable"]}}
							</el-button>
						</slot>
						<slot name="btnDel" :row='scope.row' :$index='scope.$index' :column="scope.column"
							:store="scope.store" :_self="scope._self">
							<el-button type="text" @click="btnDelParent(scope)" v-if="buttonParent.删除">
								{{comLan["btnDel"]}}
							</el-button>
						</slot>
						<slot :row='scope.row' :$index='scope.$index' :column="scope.column" :store="scope.store"
							:_self="scope._self"></slot>
					</slot>
				</template>
			</u-table-column2>
		</u-table>
		<el-pagination v-if="showPage" :current-page="searchParent.index" :page-size="searchParent.size"
			:total="totalParent" @current-change="indexChangeParent" @size-change="sizeChangeParent"></el-pagination>
	</div>
</template>

<script>
	import common from "@/common/common.js";
	import js from "@/System/Partial/SysStore/js.js";
	export default {
		name: "SysStoreListTable",
		mixins: [common.baseVM, js]
	}
</script>
